<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>制作一个杯子的模型</title>
    <link rel="stylesheet" href="demo.css">
    <script src="https://unpkg.com/vue"></script>
</head>
<body>
<div id="vue-app">
    <!--图片-->
    <div id="bag" v-bind:class="{burst:ended}"></div>
    <!-- 进度情况-->
    <div id="bag-health">
        <div v-bind:style="{width:health + '%'}"></div>
    </div>
    <!--控制按钮-->
    <div id="controls">
        <button v-on:click="punch" v-show="!ended">使劲敲</button>
        <button v-on:click="restart">重新开始</button>
    </div>
</div>




<script src="demo.js"></script>
</body>
</html>